#include <stdio.h>

/*
*	计算f(x) = 1-1/2+1/3-1/4...+1/x;
*/
int main()
{
	int x;
	scanf("%d", &x);

	float sum = 0.0;
	float sign = 1.0;
	for(int i=1; i<=x; i++){
		sum += sign*1/i;
		sign = -sign;
	}

	printf("f(%d)=%f\n", x,sum);

	return 0;
}